<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>再谈数组对象</title>
		<script>
			//  判断一个对象到底是数组对象吗
			var arr = [1,2,3];
			console.log(typeof arr);
			console.log(arr instanceof Array); // true
			
			
			var array1 = [1, 2, 'a', '1a'];
			
			console.log(array1.toString());
			
			var elements = ['Fire', 'Air', 'Water'];
			
			console.log(elements.join('-'));
			
			var arr1 = [23,2345,12,6,45];
			arr1.sort(function(a,b){
				// return a-b;
				return b-a;
			});
			console.log(arr1);
			
		</script>
	</head>
	<body>
	</body>
</html>